package warbots.entities.actions;


import java.awt.Point;

import warbots.entities.units.Unit;
import warbots.gameplay.Map;


/**
 * @author Ido Adler.
 */
public abstract class Action
{
    protected int _damage;
    protected String _name;
    protected Unit _parent;
	protected int _price;
    
    /**
     * TODO: description
     */
    public Action(final Unit parent, final String name)
    {
        _damage = parent.getPower();
        _price = _damage;
        _parent = parent;
        _name = name;
    }
    
    /**
     * @return the name
     */
    public String getName()
    {
        return _name;
    }
    
    /**
     * @param name
     *            the name to set
     */
    public void setName(final String name)
    {
        _name = name;
    }
    
    /**
     * @return the damage
     */
    public int getDamage()
    {
        return _damage;
    }
    
    /**
     * @param damage
     *            the damage to set
     */
    public void setDamage(final int damage)
    {
        _damage = damage;
    }
    
    /**
     * TODO: description
     */
    public abstract boolean execute(final Map world, final Point target);

	public int getPrice() {
		return _price;
	}
	
	public void setPrice(int price) {
		_price = price;
	}
}
